home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / misc / o-z / x-windows / amiwindupd / install_amiwinupd < prev    next >
Encoding:
Text File  |  1995-12-02  |  5.4 KB  |  233 lines

  1. (procedure check-one-file-version
  2.  (set fpath (tackon @default-dest fname))
  3.  (if (exists fpath) (
  4.   (set amiwin-version (getversion fpath))
  5.   (if (not(= amiwin-version fversion))
  6.    (abort (cat "Your file " fname " does not have the correct version\n"));
  7.   )
  8.  ))
  9.  
  10. (procedure check-amiwin-version
  11.  (set amiwin-version (getversion (tackon @default-dest "bin/AmiWin")))
  12.  (if (not(= amiwin-version 131088))
  13.   (abort "You do not have AmiWin 2.16 installed.\n");
  14.  )
  15.  
  16.  (working)
  17.  (set n 0)
  18.  (while (set fname (select n
  19.   "bin/mkfontdir" "bin/oclock" "bin/twm" "bin/xauth" "bin/xcalc"
  20.   "bin/xclock" "bin/xdpyinfo" "bin/xhost" "bin/xkill" "bin/xlsclients"
  21.   "bin/xset" "bin/xsetroot" "bin/xwininfo" "libs/xau.library"
  22.   "libs/xaw.library" "libs/xfont.library" "libs/xice.library"
  23.   "libs/xlib.library" "libs/xmu1.library" "libs/xmu2.library"
  24.   "libs/xsm.library" "libs/xt.library" "libs/xtrans.library"
  25.   "xle/mitmisc.xle" "xle/multibuf.xle" "xle/shape.xle"
  26.   "xle/sync.xle" "xsd/aga-1.xsd" "xsd/aga-8.xsd" "xsd/rtg-1.xsd"
  27.   "xtp/amitcp.xtp" "xtp/as225.xtp" "")) (
  28.   (set fversion (select n
  29.    131088 131072 131086 131072 131088
  30.    131072 131084 131084 131084 131086
  31.    131084 131084 131084 131072
  32.    131088 131088 131083
  33.    131086 131083 131086
  34.    131072 131088 131083
  35.    131072 131072 131072
  36.    131072 131086 131088 131086
  37.    131072 131072))
  38.   (check-one-file-version)
  39.   (set n (+ n 1))
  40.  ))
  41. )
  42.  
  43. (procedure select-destination-directory
  44.  (set @default-dest
  45.   (askdir
  46.    (prompt "Select the directory where you have "
  47.     "installed AmiWin 2.16 demo. The default is "
  48.     "probably correct.")
  49.    (help "Please specify the directory where you have "
  50.     "installed AmiWin 2.16 demo. The default is "
  51.     "the X11: directory, i.e. the likely place of "
  52.     "your AmiWin installation.")
  53.    (default "X11:")
  54.   )
  55.  )
  56. )  
  57.  
  58. (procedure patchonefile
  59.  (copyfiles
  60.   (source (tackon srcdir srcfile))
  61.   (dest "T:")
  62.   (newname "oldfile")
  63.  )
  64.  
  65.  (working)
  66.  (run (cat "\"" (tackon source-dir "bin/spatch") "\" -oT:newfile \"-p" pchfile "\" T:oldfile"))
  67.  
  68.  (copyfiles
  69.   (source "T:newfile")
  70.   (dest srcdir)
  71.   (newname srcfile)
  72.  )
  73.  
  74.  (delete "T:oldfile")
  75.  (delete "T:newfile")
  76. )
  77.  
  78. ;;;; Start
  79.  
  80. (set app-name "AmiWin 2.22demo")
  81.  
  82. (complete 0)
  83.  
  84. (set source-dir (if (= 1 (exists @icon)) (pathonly (expandpath @icon))
  85.  (expandpath @icon))
  86. )
  87.  
  88. (select-destination-directory)
  89.  
  90. (check-amiwin-version)
  91.  
  92. (complete 10)
  93.  
  94. (copyfiles
  95.  (source (tackon source-dir "x11/Help"))
  96.  (dest (tackon @default-dest "Help"))
  97.  (all)
  98. )
  99.  
  100. (complete 12)
  101.  
  102. (if (not (exists (tackon @default-dest "xsr")))
  103.  (makedir (tackon @default-dest "xsr"))
  104. )
  105.  
  106. (copyfiles
  107.  (source (tackon source-dir "x11/xsr"))
  108.  (dest (tackon @default-dest "xsr"))
  109.  (all)
  110. )
  111.  
  112. (complete 14)
  113.  
  114. (copyfiles
  115.  (source (tackon source-dir "x11/libs/xdmcpintl.library"))
  116.  (dest (tackon @default-dest "libs"))
  117. )
  118.  
  119. (complete 16)
  120.  
  121. (if (not (exists (tackon @default-dest "man")))
  122.  (makedir (tackon @default-dest "man"))
  123. )
  124.  
  125. (copyfiles
  126.  (source (tackon source-dir "x11/man"))
  127.  (dest (tackon @default-dest "man"))
  128.  (all)
  129. )
  130.  
  131. (complete 18)
  132.  
  133. (copyfiles
  134.  (source (tackon source-dir "x11/xle/amiwinmisc.xle"))
  135.  (dest (tackon @default-dest "xle"))
  136. )
  137.  
  138. (complete 20)
  139.  
  140. (copyfiles
  141.  (source (tackon source-dir "x11/xle/lbx.xle"))
  142.  (dest (tackon @default-dest "xle"))
  143. )
  144.  
  145. (complete 22)
  146.  
  147. (copyfiles
  148.  (source (tackon source-dir "x11/xsd/cybergraphx-8.xsd"))
  149.  (dest (tackon @default-dest "xsd"))
  150. )
  151.  
  152. (complete 24)
  153.  
  154. (copyfiles
  155.  (source (tackon source-dir "x11/xsd/graffity-8.xsd"))
  156.  (dest (tackon @default-dest "xsd"))
  157. )
  158.  
  159. (complete 26)
  160.  
  161. (copyfiles
  162.  (source (tackon source-dir "x11/xsd/hrg-8.xsd"))
  163.  (dest (tackon @default-dest "xsd"))
  164. )
  165.  
  166. (complete 28)
  167.  
  168. (copyfiles
  169.  (source (tackon source-dir "x11/xsd/picasso-l-8.xsd"))
  170.  (dest (tackon @default-dest "xsd"))
  171. )
  172.  
  173. (complete 30)
  174.  
  175. (copyfiles
  176.  (source (tackon source-dir "x11/xsd/retina-8.xsd"))
  177.  (dest (tackon @default-dest "xsd"))
  178. )
  179.  
  180. (complete 32)
  181.  
  182. (copyfiles
  183.  (source (tackon source-dir "x11/xsk/is.xsk"))
  184.  (dest (tackon @default-dest "xsk"))
  185. )
  186.  
  187. (complete 34)
  188.  
  189. (set srcdir (tackon @default-dest "bin"))
  190. (set srcfile "AmiWin")
  191. (set pchfile (tackon source-dir "x11/bin/AmiWin.pch"))
  192. (patchonefile)
  193.  
  194. (complete 36)
  195.  
  196. (set n 0)
  197. (while (set srcfile (select n
  198.  "mkfontdir" "oclock" "twm" "xauth" "xcalc" "xclock" "xdpyinfo"
  199.  "xhost" "xkill" "xlsclients" "xset" "xsetroot" "xwininfo"
  200.  "xau.library" "xaw.library" "xfont.library" "xice.library"
  201.  "xlib.library" "xmu1.library" "xmu2.library" "xsm.library"
  202.  "xt.library" "xtrans.library" "mitmisc.xle" "multibuf.xle"
  203.  "shape.xle" "sync.xle" "aga-1.xsd" "aga-8.xsd" "rtg-1.xsd"
  204.  "amitcp.xtp" "as225.xtp" "")) (
  205.  (set reldir (select n
  206.   "bin" "bin" "bin" "bin" "bin" "bin" "bin" "bin"
  207.   "bin" "bin" "bin" "bin" "bin" "libs" "libs" "libs"
  208.   "libs" "libs" "libs" "libs" "libs" "libs" "libs"
  209.   "xle" "xle" "xle" "xle" "xsd" "xsd" "xsd" "xtp" "xtp"))
  210.  
  211.  (set srcdir (tackon @default-dest reldir))
  212.  
  213.  (if (exists (tackon srcdir srcfile)) (
  214.   (set pchfile (tackon (tackon (tackon source-dir "x11") reldir) (select n
  215.    "mkfontdir.pch" "oclock.pch" "twm.pch" "xauth.pch" "xcalc.pch"
  216.    "xclock.pch" "xdpyinfo.pch" "xhost.pch" "xkill.pch"
  217.    "xlsclients.pch" "xset.pch" "xsetroot.pch" "xwininfo.pch"
  218.    "xau.pch" "xaw.pch" "xfont.pch" "xice.pch" "xlib.pch"
  219.    "xmu1.pch" "xmu2.pch" "xsm.pch" "xt.pch" "xtrans.pch"
  220.    "mitmisc.pch" "multibuf.pch" "shape.pch" "sync.pch"
  221.    "aga-1.pch" "aga-8.pch" "rtg-1.pch" "amitcp.pch"
  222.    "as225.pch")
  223.     ))
  224.    (patchonefile)
  225.  ))
  226.  (set n (+ n 1))
  227.  (complete (+ 36 (* n 2)))
  228. ))
  229.  
  230. (exit "Installation of the update from AmiWin 2.16 demo to "
  231.  "AmiWin 2.22 demo is finished.")
  232.